#!/bin/bash
#
# Setup for Control Plane (Master) servers'

set -euxo pipefail

NODENAME=$(hostname -s)
##############################################################
#sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

#sudo curl -L  "https://nrjqvxfy3a2n.objectstorage.ap-tokyo-1.oci.customer-oci.com/p/-0hh1ctG1eRl1_zHQhcSGaXaWcgRonjruYMNKu-MP43PeHNIlSVMB6G3HiK9yZmC/n/nrjqvxfy3a2n/b/forai/o/docker-compose-linux-x86_64.zip" -o /docker-compose.zip



#初始化docker-swarm
#echo Master IP $control_ip
#sudo docker swarm init --advertise-addr $control_ip
#sudo docker swarm join-token manager > /vagrant/join.sh
#sudo docker swarm join-token worker > /vagrant/join.sh
#sed -i '/^To/d' /vagrant/join.sh